package com.yonyou.brigade.ybz.controller;

import com.yonyou.brigade.ybz.service.ICnvEntityService;
import com.yonyou.brigade.ybz.service.ICnvRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 向转换平台注册实体及属性
 *
 * @Auther: kfw
 * @Date: 2018/8/21 10:27
 */
@RestController
@RequestMapping("/ybz/entity")
public class CnvEntityAndAttributeController {
    @Autowired
    @Qualifier("cnvRegisterServiceImpl")
    private ICnvRegisterService cnvRegisterService;

    /**
     * 向转换平台注册实体及属性
     *
     * @param null
     * @Auther: kfw
     * @Return: String 注册结果
     * @Date: 2018/8/21 10:29
     */
    @RequestMapping("/insert")
    public String registerEntityAndProperty() {
        String userId = "5dbb8df8-0956-4cd1-9da3-43b180069f0f";
        String tenantId = "zrez2bx9";
        boolean result = cnvRegisterService.registerEntityAndProperty(userId, tenantId);
        return result ? "实体及属性注册成功！" : "实体及属性注册失败！";
    }
}

